<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="always" name="referrer">
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- 移动端必须的设置 -->
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 禁用电话号码检测功能，禁止对数字随便可以拨号 -->
<meta name="format-detection" content="telephone=no">
<!-- 禁用E-mail检测功能 -->
<meta name="format-detection" content="email=no">
<!-- 禁用地址检测功能，禁止跳转到地图 -->
<meta name="format-detection" content="address=no">
<!-- 在苹果设备上以全屏方式打开本网页 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 设置在苹果设备上状态的颜色，默认白色，要设置成什么颜色以Web颜F色的风格而定 -->
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../js/base64.js"></script>
<script type="text/javascript" src="../js/layui/layui.js "></script>
<script type="text/javascript" src="../js/doT.min.js"></script>
<link rel="stylesheet" href="../js/layui/css/layui.css" />
<link rel="stylesheet" href="../css/basestyle.css" />
<!--  <link rel="stylesheet"
	href="../vendor/font-awesome/css/font-awesome.min.css" />
 <script type="text/javascript" src="../vendor/resize.js"></script>-->
<!-- 业务js.css -->
<link rel="stylesheet" href="../busi/css/aui.css" />
<link rel="stylesheet" href="../busi/css/company_list.css" />
<link rel="stylesheet" href="../busi/css/aui-pull-refresh.css" />
<script type="text/javascript" src="../busi/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../busi/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../busi/js/PullRefresh.js"></script>
<script type="text/javascript" src="../js/popupstyle.js"></script>
<title>产废单位登记列表</title>
</head>

<body>
	<%@ include file="../basejsp.jsp"%>
	<header class="aui-bar aui-bar-nav aui-bar-light aui-margin-b-15">
			<a class="aui-pull-left aui-btn" onclick="loginReback()">
				<span class="aui-iconfont aui-icon-left"></span>
			</a>
			<div class="aui-title">产废单位登记列表</div>
			<a class="aui-pull-right aui-btn">
				<!-- <span class="aui-iconfont aui-icon-more"></span>-->
			</a>
		</header>
		<input type="hidden" id="totalNum">
	<div id="busilist" class="conmpanyList-box aui-refresh-content">
		
	</div>
	
	<footer onclick="busiAdd()">
			+
		</footer>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/doT.min.js"></script>

	<!-- 将类型设置为template，标识为doT.JS -->
	<script type="template" id="dotTmpl">
	{{ for(var i=0;i<it.length;i++){	}}	
		<div class="conmpanyList aui-row aui-margin-b-15">
			<div class="aui-col-xs-3 conmpanyList-left">
				<div class="conmpanyList-left-box"
				{{if(it[i].regurl != null && it[i].regurl !=''){}}
					style="background: url(http://118.178.18.0:8082/{{=it[i].regurl}});background-size:100%;"
				{{ }}}
				>
				</div>
			</div>
			<div class="aui-col-xs-6 conmpanyList-center">
				<div class="conmpanyList-center-title">{{=it[i].regorgname}}</div>
				<div class="conmpanyList-center-userBox">
					<i class="aui-iconfont aui-icon-my"></i>
					<span>{{=it[i].regrealname}}</span>
				</div>
				<div class="conmpanyList-center-userPhone">
					<i class="aui-iconfont aui-icon-mobile"></i>
					<span>{{=it[i].regphone}}</span>
				</div>
			</div>
			<div class="aui-col-xs-3 conmpanyList-right">
				<div class="conmpanyList-right-modify">
					{{if(it[i].regstatus ==-1){}}
					<i class="aui-iconfont aui-icon-edit" onclick="busiEdit({{=it[i].registerid}})"></i>
					{{ }}}
				</div>
				<div class="conmpanyList-right-status">
					{{if(it[i].regstatus == 1){}}
						<span class="aui-bg-success">有效</span>
					{{ }}}
					 {{if(it[i].regstatus ==0){}}
						<span class="aui-bg-success">有效</span>
					{{ }}}
 					{{if(it[i].regstatus ==-1){}}
						<span >信息不完整</span>
					{{ }}}
				</div>
			</div>
		</div>
	{{ }}}
	</script>
	<script>
		var countPage =0;
		var pageSize = 20;
		function busiAdd(){
			location.href="../busiuser/busiadd.jsp";
		}
		function busiEdit(busiId){
			setcookie("busiId", busiId, 30, "/");
			location.href="../busiuser/busiedit.jsp";
		}
		function loginReback(){
			location.href="../busiuser/login.jsp";
		}
		$(function() {
			messagefindlist(0);
		})
		function messagefindlist(count){
			var jsonstr = "businessphone="+getCookie("phonebusiuser")+"";
			//var jsonstr = "filterscount=0&groupscount=0&pagenum="+count+"&pagesize="+pageSize+"&recordstartindex=0&recordendindex=10&businessphone="+getCookie("phone")+"&businessrealname="+getCookie("username")+"";
			$.ajax({
					cache : false,
					type : "post",
					datatype : 'json',
					contentType : 'application/json;charset=UTF-8',
					data : jsonstr,
					url : ''+httpipstr+'alfa-mobile-ws/rest/registerbehavior/findlist?mobiletoken='+getCookie("mobiletokenuserbusiuser")+'',
					success : function(data) {
							var tmpl = doT.template($("#dotTmpl").html());
							// 将数据扔进templ中。并在DIV中显示出来
							$("#busilist").html(tmpl(data.rows));
						},
						error: function (xhr, textStatus) {
			                if (xhr.status==0) {
			                	location.href="../busiuser/login.jsp";
							}
			            }
				});
		}
	</script>
</body>

</html>